<template>
  <div>
    <PageHead title="混入" />
    <div class="page-cont"></div>
    <div style="width: 20%">
      <InputCom v-model="inputVal" :configValues="inputComConfigs" @update="changeHandle"></InputCom>
      <SelectCom v-model="selectVal" :configValues="selectComConfigs" :options="selectList" @update="changeHandle">
      </SelectCom>
    </div>
    <el-button style="margin: 10px 0;" @click="getForm"> 获取内容</el-button>
  </div>
</template>

<script>
import InputCom from "./component/InputCom.vue";
import SelectCom from "./component/SelectCom.vue";
export default {
  components: {
    InputCom,
    SelectCom,
  },
  data() {
    return {
      inputVal: "",
      inputComConfigs: {
        placeholder: "请输入1111",
        key: "inputVal"
      },
      selectComConfigs: {
        key: "selectVal"
      },
      selectVal: "",
      selectList: [{ label: "选择1", value: 'select1' }, { label: "选择2", value: 'select2' }],
    };
  },
  methods: {
    getForm() {
      console.log(this.inputVal, this.selectVal);
    },
    changeHandle(v, code) {

      this[code] = v
    }
  },
};
</script>

<style lang="scss" scoped></style>
